package com.ucom;
import java.io.*;

import com.ucom.*;

public class SelectDAO {
	public void daoSelect(){
		System.out.println("Please select from the following list of queries that you want.");
		System.out.println("If the query you want to check is not available in the list.");
		System.out.println("check the queries.sql file. ");
		System.out.println("Queries - 1, 2, 5, 6, 7, 8, 9, 11, 12, 13");
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		try {
			int choice = Integer.parseInt(br.readLine());
			switch(choice){
			case 1:
				UcomPrinterUsageDAO upudao = new UcomPrinterUsageDAO();
				upudao.query1();
				break;
			case 2:
				UcomPrinterUsageUsersDAO upuudao = new UcomPrinterUsageUsersDAO();
				upuudao.query2();
				break;
			case 6:
				UcomStudentWorkloadCourseDAO uswcdao = new UcomStudentWorkloadCourseDAO();
				uswcdao.query6();
				break;
			case 8:
				UcomStudentWorkloadDAO uscdao = new UcomStudentWorkloadDAO();
				uscdao.query8();
				break;
			case 5:
				UcomStudentWorkloadDept uswd = new UcomStudentWorkloadDept();
				uswd.query5();
				break;
			case 7:
				UcomStudentWorkloadDifferenceDAO uswddao = new UcomStudentWorkloadDifferenceDAO();
				uswddao.query7();
				break;
			case 9:
				UcomWorkloadDifference uwddao = new UcomWorkloadDifference();
				uwddao.query9();
				break;
			case 3:
			case 4:
			case 10:
			case 11:
				Query11 q11 = new Query11();
				q11.query11();
			case 12:
				Query12 q12 = new Query12();
				q12.query12();
			case 13:
				Query13 q13 = new Query13();
				q13.query13();
			case 14:				
			case 15:
			case 16:
			case 17:
			case 18:
			case 19:
			case 20:
				default: System.out.println("Please refer to the queries.sql file for the sql statment");

			}
		} catch (NumberFormatException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
}
